package org.goyo.main.domain.dao.sale.impl;

import java.util.List;

import org.goyo.common.exception.DBException;
import org.goyo.main.domain.dao.BaseDAO;
import org.goyo.main.domain.dao.sale.ILossDao;
import org.goyo.main.domain.entity.sale.Loss;
import org.springframework.stereotype.Repository;

@Repository
public class LossDaoImpl extends BaseDAO implements ILossDao{
	
	@Override
	public List<Loss> findByResourceId(String parentId) throws DBException {
		String hql = "from Loss where resourceId=?";
		return this.findObjects(hql, null, new Object[]{parentId});
	}
}
